<template>
  <div class="search-header">
    <div class="left-title">
      <p class="left-text">
        <span class="iconfont">&#xe771;</span>
        {{title}}
      </p>
      <div class="right">
        <button v-show="outputList">导出列表</button>
        <el-select v-model="value1" placeholder="显示条数">
          <el-option
            v-for="item in options1"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
        <el-select v-model="value2" placeholder="排序方式">
          <el-option
            v-for="item in options2"
            :key="item.value"
            :label="item.label"
            :value="item.value"
          ></el-option>
        </el-select>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  name: "listHeader",
  data() {
    return {
      title: "合同列表",
      outputList: true,
      // 显示条数的data
      options1: [
        {
          value: "选项1",
          label: "1"
        }
      ],
      // 排序方式的data
      options2: [
        {
          value: "选项1",
          label: "a"
        }
      ],
      // 显示条数的v-model
      value1: "",
      // 排序方式的v-model
      value2: ""
    };
  }
};
</script>

<style>
.search-header {
  width: 1100px;
  box-sizing: border-box;
  border: 1px solid rgba(228, 228, 228, 1);
  background-color: rgba(255, 255, 255, 1);
  margin: 20px 0 0 100px;
}

.search-header .left-title {
  display: flex;
  justify-content: space-between;
  width: 100%;
  background-color: rgba(243, 243, 243, 1);
  height: 45px;
  box-sizing: border-box;
  border: 1px solid rgba(228, 228, 228, 1);
}

.search-header .left-title .left-text {
  width: 20%;
  color: #666;
  font-size: 14px;
  line-height: 45px;
  font-weight: 700;
  text-align: left;
  margin: 0 0 0 30px;
}


.right {
  width: 70%;
  display: flex;
  justify-content: flex-end;
  margin-right: 30px;
}

.right button {
  padding: 0 15px;
  height: 30px;
  margin: 6px 5px;
  line-height: 30px;
  font-size: 14px;
  color: #666;
  background-color: #fff;
  border: 1px solid #ccc;
}

.right button:hover {
  background-color: #f3f3f3;
}

/* 下面都是修改饿了么ui的下拉框和按钮选中后的样式 */

.el-select .el-input.is-focus .el-input__inner,
.el-select .el-input__inner:focus {
  border-color: #e4e4e4;
}

.el-select-dropdown__item.selected {
  color: #666;
  font-weight: 400;
}

.el-select-dropdown {
    min-width: 100px !important;
    top:50px !important;
    margin-left: 5px;
}
.el-select-dropdown__item{
  height: 26px;
  line-height: 26px;
}

.el-select .el-input__inner{
  width: 100px;
  padding:0 8px;
  height: 30px;
  margin: 6px 5px;
}
</style>